improved the pattern lib a little more