add support for creating indexes.  improve the tests and tests for events