created Main controller with index