Modify factory method to take a parameter dictionary