Merge pull request #13 from ebf/xiaodong

solved issues from Petra
solve issues for petra
Merge branch 'master' into xiaodong