new function that open new files