insert func implemented
add some fung declarations