directory structure & utility functions