Implemented for a final CIS 120 homework assignment