Kelun's solution of hw3.1