Explaining my solution