simulation now works