rename function, add API