better use of opaque pointer