add Template method pattern