added string encoding