ship allocation refactoring