my solution to ruby99