added functions to test range in spec