added mass distribution fix code