rework thumbnail resizing