encoding seems to be working