implemented rest calls