prototyping
moved index logic elsewhere