cleaned up grabbing of file data