code for valid size support