Changed function names for running database transaction