first version of bounds checker