starting splitting logic from main file into modules/scripts