initialized parameters to empty array instead of undefined