more work on library functions