Added function for filtering keys in params object