added Sizechanging functionality