added a littel validation
added a little validation