extensible code to filter device values