Added basic patterns demo code