Modelling the effect of sloshing on ship motions