Merge pull request #2 from orignal/master

update
a bug has been fixed. some warnings have been found
Merge pull request #10 from mikhail4021/master

a bug and warnings