week1: Solution for remaining 2/6 problems