modified function library