changed drawing of global borders to more generic approach