moved to sample/result format for javascript