Add miscellaneous functions