some utils

Signed-off-by: cocolekat <cocolekat@gmail.com>