added code fixes #1