solution to problem number two