added pseudo, solution