updating maps, converting to modular pattern