problem 1 functional