Added to_i method
Addded test for conversion
Merge pull request #17 from janjiss/master

Added to_i method