move resizze code to a specific class
refactor