Edge core algorithm part 2