as() implementation simplified