added createor for the factory and added some getters