step 5: loading and validation