change file structure and add documentation