Adding validation