Effected setsize function