some pseudocode to organize scripts and functions