Tried to implement category A2
Some improvements