Used define method to capture similar patterns