implemented edge slice
refactoring