incorporating Jun's suggested changes