modify search due to change in data type from arrayList to taskList