Added Subclasses and factory and started caluclation