updated paths and added fields to factory pattern