use method and file open