First working draft of resizeListener