Naive and dirty implementation to satisfy exercise's spec