cleaned up a bit of old code