big changes to accomodate montgomery reduction code (still in progress)