class docking refactored