added structures to enable scheduling
cleanup