improved test cases and added rest client