Added more flexibility and output ground truth