modified the order of encoding filer