naive algorithm ok