code cleanup
tuples are valid inputs
cleanup