Unit tests

ut for some part of the code