Formalise my solution and the workshop one