added get by id and test cases