as() function added