added header and a few other changes