Short naive implementation