updating size and positioning