finished merge with edge code