fixed bug with wildcard character, added func