refactored code, added test for shipyard in Ship