rewriting of angular.js in a light version