Added filter functionality

A few correction, increasing print statements and the extension of filter.