unit testing for task 1 question 1

plus conversion to class
Revert "unit testing for task 1 question 1"

This reverts commit 0d76efbd2a90d8240ba750ef519bdfb1f4a142a5.