Refactorisation, adding new functions