created main controller