improving autoinvoiving