Revised to add to db