add some functions in js