using loop function for sizes