passing index