better scheduler and logging