logic in the header