add anchor_len option for build function