Use new dict_valnamebyattr function