starting to generalize into a class