added test file, changed replaceMap from const to var, maps can't be consts