update data - only include data that is used