removing redundant variable passing