avoid creating unnecessary temporaries