generate ship method