refactor using only two directories at the root