implement multiple template