added jump terms everywhere that A appears and scaled the jump terms by the mass matrix, which seems to be important