updated to put method and using req helper for url param