add def to controller
Merge pull request #4 from Verkalets/3-fix-controller

add def to controller