Done (but in a slightly less elegant manner)