syntactic sugar for last implementation of problem 2