Another attempt at solving #59