removed angularjs
moved function