added the dynamic filter rooms function