wrote some simple code for testcases, still not finished
more detail added, still not complete