modified to send only json data