fixing insertion bugs. Edge lengths are still wrong
off by ones fixed for inserts