Implemented Filter.

Passed test case 3 and 4
Add entry insertion function for createIndex.