my solution for #50