final check the input is correct