add singletion desing pattern
add templatemethod design pattern