more development on adjusting fragment boundaries when editing, should be simplified