better handle directory structure