auxillary functiond