added header and other minor changes