working with three files