reorganizing files and writing code