need to slow this down to understand the dir structure better