Yup everything is done at once, nope you function is doing it little differently, it's quite apparent from the documentation.