add functions to run with angular