added blank checking