my solution updated