replace serializeJSON with serializeObject