added encoding

Fix for Issue #34