better validation and removed extra space after tens