resiing with scaling implemented