implemented nameCheck