refactored code a bit
trying to get map going