Create nud function for do while loop