finish functionality of resize, not smooth though :(