trying to get index right