$ should be passed into the factory method