works for both discretizations
same
before any changes