updated with stop command for server and test_api for unit test