add from_task, stop_before and stop_after options and tests