added test for api