updates as per @collinhover's suggestions on issue #54