added header and comments