access private member using template trick