update dependencies
set proper template in config
simplify logic
new tests for new logic