addressed issue #26, and made some minor improvements and corrections.