Changed function signature to move optional param to the back