separate function in several files to test different ways