added more to template method pattern and using hooks