misc (gross) changes to get this to work