added library functions for problem 46