resizing appropriatly