improved of the organisation of the code