wrote few tests on the code