remove anonymous function in index file