added modal controller contructor and instaitiate it in the main index