update create_data method to update table only once, remove unnecessary comments