class A implementation