use constant references for some parameters