Add wildcard function
remove old code