Improved setrange