add some functions, but there is a small issue