making encoding configurable