This does not seem like the best way to reduce code redundancy