(#129)

issue #126 and #129 is solved in one branch. For more details see  PullRequest #126