moved angular code to module