rest path changes, better parsing logic