added function to set the size