execute tasks in proper order