move scipt methods to util_general.py for better use when importing cbayes