implemented set_data