compiling with different type classes