fix all const and add references to arguments
add const, references parameters and print functions