made it work from subdirectories