finish main function of tasks
write tasks