relocated variable method to print function