add function json-response
remove mess code, change file encoding to utf8