An obvious implementation