changed function tempData