fixed some equations, but doesn't look much better