unify & refactor
fix with new angularjs