ticket:5 added tests
ticket:5 improved templates