it's not sure that the function is used inside the "loop"