res.json instead of res.write