bunch of old code