moved to main.js for cleaner, crispier code