fix function declaration and add parser file