mostly bill getting function
directory structure