EOF rough implementation