added upsert so no duplicates will be added to db