added simulation mode