started rewrite with angular+require