create a pattern tool