First attempt at implementing the pattern