Template method pattern