before function before dotcmd before while before return after dotcmd after function