out parameters should be a pointer instead of a non-const reference