changed approach to map creation. reorganized code to suit that.