Used variables's lenth method instead of constant.