add adaptive scheduler and some testing helpers