changed add/edit from activity-based to dialog-based; implemented compare