encode instead of quote

Fixes #26 
would it be possible to add unit tests somehow?