Made possible to provide number of patterns