[api] implify code