cleaning up (slower?) old code