fixed function that need sails arguments