added lrange function