update clear completed tasks function