added extension type to adhoc stored function