ship state pattern