Added edge coordinate to index calculations