change func names and fix typo