called the function correctly