overwrite functionality added to addData function.