implemented REST API