added level-end trigger, start and win states