rewrite release method, docking, refactoring code