First solution, as a test