added getRange() function