added appending to database