added tempfile processing function and updated data