add parser to define function