I really don't like these variables passed as arguments. You don't need them, they make your code less testable and uglier.