Completed the validation curve code