trim tasks if no pending tasks
add tests for execution graph