Add abstract encoder