change the subroutine templates too sub method and sub function