added kvjoin function