merging issue-240 to master