change the length to int