design-pattern implemention with hacklang