fix typo and move old func bottom