Added new method 'filter'. Tests.