slow type class implementation