changed design to abstract generalisation