renamed actualLength variable to strokeLength