added a code to outout json