add Patterns and Data structure JS