template method structure