moving methods to the File class