add two useful functions