proper encoding