remove extraneous masking in encode, remove some println from test