addPinn added to db functions