Replace pointers with external var