reorganized the files and the code