Changed output format to JSON and added elapsed_time field