use new dot_interpolate(foo, bar) instead of foo.replace('.', bar)