Modify tasklist after every command

that arraylist must be kept updated