Filtering inputs added

Fix for #3