Initial, naive code