breaking dependencies caused by template method pattern