refact afx wrapper
 .