remove trailing whitespace
pass tuples, use correct function