add auto complete, but not finished. refacting the task and listener code