added dynamic updating for header