refactored to use annotations to define what operations are exposed.