optimize when change screen size