fix add_type bug
finish basic function