First implementation, stack