refactor js into app.js
working on loading countries