adeed enumerated type for function  return codes