Updated solution with codecombat code