update divs a bit to be exactly like matlab code, run tests based on matlab code