fixed up for general use