more work on a better simulation