added option to define a default range length