more slight adjsutments
some cleaning up
fixed a terrible calculation mistake!