solved some errors and headers are written