fixing the rest api