make bpan.bash a collection of basic functions