Added helper for getting previous tasks.