#72 completed - implemented filter function