New green-function method to predict wave-induced ship motions and loads