Some functions, may be useful.