wrote some on whole system simulation