Added miscellaneous functions