print statement for the end added