extract common base class, pull members up, removed duplicated code