moving closer to a more object-oriented solution