tried to make map work on index