added library functions