WIP creating dual filtering algorithm