modified index and added code for simple filter