Added calls to some database functions