Some useful functions met in my study