optional index and new demo