improve activity scheduler