made classencoder auxiliary functions public