first approach using header