added one more assertion for ending range