searches the correct directory