functions  for C shell