initial import of old code