little modification of AB.java