add api for #24