Completing the function