some changes

added some unit tests