move encoding before require