check boundaries and return false right away

this fixes issue #3