Refactor to make simplier

numbers in, numbers out