fixed division utility functions and tests for them.