cleaned parameter passing, prevent error conditions