move to angular.js