added improvements from PLJNS.com