range based block implemented