Adding a helper function.