implemented basic stage/wave handling