Incorporated changes from mike sierra