function 1:add an in/outcome to database complete