Adding some validation