writing get files routines