partial implementation of several db calls for createpallets