adding validation and some unit tests