separating logic into files.