fixed branch op code bug
merging code from iProject2 gh-pages branch