Adding code for validation and evaluation