loose coupling with template