moved from backboneJs to angularJs