created task controller functions