base and index sorted out