split functions into bin/coco.py