a bit of work on the rest api