pattern to number works