write docs; try basename match first