update example usage of bpg.encode