add edit feature, better sync mechanism