added dense branch in inv sqrt mass