uses header files instead of the hdu object