generic model corrected and initial simulation backend implementation

simulation initial implementation (incomplete)