changed process-bid to allow inserting to db