update to auto ref counter and prepare for render lib use