looked into error systems in javascript
created switch statement to render different objects
working rendering maps