Implemented kernel filter.