solution to the 4th step