add initial support for $aggregate