thandy check this code it has the check for usrname too