begin class-based implementation of agents