better rest api design