groundtruth added and implemented to code