added globbing support (code needs cleanup now)