comments and correct signature of abstract Adapter.encode()