Extract ShipType
Use local variables