moved map code to seperate javascript file