Done here and above for edit mode as well