classes to handle rest requests