rewriting tasks controller from skratch - phase 1