extract a filename prediction function