Solved a problem from HW-1