added basic support of binary encoding