test rectangle overlap