Header function and scalling