header and some comments added