Third challenge using ruby