added inq and attr functions