generalized common code into parent/interface classes