new directory based design - one function per file