change response method from res.write -> res.json