First implementation attempt