encoding stuff for fun times