renamed index file, added legend pointer