Added support for refP