Adding resize handler