getting simulation working