less redundant code, separate files