implement functions of type class directly
fix typo