added scheduling stuff