added first unit test & some changes