modified with range