update code;
fully implement page resizing