adding validation and space limits