changing signature of encoder