move pre-filter to common part