added null check, removed task