main js for the app