replace deprecated functions
Merge pull request #25 from gsmark/master

replace deprecated functions