added sram-simulator and fixed bugs