fix #4 add asLocal param