move data field from settings to function arguments