mainviewcontroller and delegate class