fixing template. moved value from view to controller