create base class for Main to make it easy to extend Main