modified print function and added information in header and source file