correcting the rest api