set side length function.