Added simulate.c