refactorisation, remove unused function + add mode createdatabase "-c"