generating out json to send on