added render :json => @output so that output actually is json