added model-behaviour. fixed controller. added tests

issue #83