Use mkws.$(x) throughout in place of $(x).