new api for rainbow