Change callback to be last parameter in factories