updated the usage of the custom rest method