update polylib for speed improvement in in_domain