Can't find the code for this anywhere, used to have it somewhere (dammit!)...