Range function seems to be working