add pry to gems
support old and new indices format