backend api conversion to library functions