this is your basic 'check all four corners' algorithm