calcIndex working
calcIndex working