strip header function added