added mechanisms to handle stages and send events to players