Problem 2 and Utilities