added from_filehandle function