a new version using glob