adjust structure, complete half of the file manipulation