replace calls to bc with printf