A Boundary Element Method for Motions and Added Resistance of Ships In Waves