refactor of ships class