rest functionality