Refactoru Wk2 exercise - validate data input for format