add some functions of js