initial import of original code