initial commit from the original code