corrected a function that errored, all good now