adding library functions