customencoder