everything in index.html working
code refactored for get request