working version with fixed namespaces and file structure