naive solution works