added cust function library