Add to_bytes function
Merge pull request #10 from bkkrw/master

Add to_bytes function