add prev attribute to Bubble class.