class methods for file