'as' in schema made omittable
bug fixed
add unit tests