modified my JSON Data and creating functions on my main.js file