fill bipwriter functions