file method works