Homework 4 - 2nd commit

Added Logic
Added tests