Made domain filter more generic