modify route's data into function to get @params