added file input functions