added ADD function to insert CIDs to mysql database