introduce BaseContext as an abstract class