Updated code style for problem 5 solutions