don't forget to reduce index when removing elements