more work on division algorithm