use Logarityhm, change controllers to work  with directives, no JS is changed