shamelessly stealing dexters code to see if this works