7/8/2014: made a base class and pushed some logic up to it