implemented rest service