added two files that aim to contain duplicate code