finish the functions

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