function add implemented