add handler func and fix typo