finalize main page