check bounds