First attempt at a solution