Refactoru Wk2 problem set