added main controller and index js