refactor func ptr assign
refactor func ptr assign