problem 7 refactor for proc. time