added some unit testing