This is my solution. It works but not elegant.  
This is my solution. It works but not elegant.