rewriting tasks controller from skratch - phase 2