improved error msgs, as* functions