Initial Working Code (ugly because i don't speak ruby)