refactor for 1.8.7 - with_index not available on Array in 1.8.7
update dependencies for 1.8.7