removing unused string encoding and error variables