added form db functions