main param fix, constness removed from certain parameters