work on input refactorisation