working version of wildcard