better handling bounds