updated mutliple files and incorporated changes posted by evgeny