abstracting away edge adding to prepare for #1