remove templates
make small refactoring