refactored code to avoid this drastic kind of nesting
return exact response of what changed