optimize the layout for mobile device