adding support for editing, WIP for changed related fields
additional modifications