more error checking. spaces now allowed.