added more rest api functionality