fix #14, add region filtering