using serialize instead of json_encode
using serialize instead of json_encode