refactored the directory layout. added a test with FactCheck