simplifying... it's not awesome and it's a bad gui design, but
it doesn't crash anymore (i think) and it expemplifies how to build
an indexing function