Added w-resize function for window resizing