adding dynamic mainpage