6th challenge using ruby