merge quokka.py with cabin version