incorporated changes from forum