good version, answered question for Euler correctly