add support for jumping between areas; fixes to edge detection