added mass matrix calculation