change on window size method for centering