creating new class to move code from app.js