refactor vars validation
convert body encoding to utf8