add a function

Signed-off-by: TerrorJack <astrohavoc@gmail.com>