Added yet more pattern functions