update layout of main page