added staged functions to database service