modified controller files for mainpage