made some improvements; thanks Gene Welborn