implemented dynamic filtering