fix small typo
broke out code into separate files