Added filter function on insert, WIP