added proper db functions for update collection