- improve error detection and messages - avoid sigma/cutoff to be zero (and thus division by zero) - move new/delete of temporary storage outside of loop