major updated, integral checking of charge, and can now integrate to the left and right of a value