started multidigit logic. Changed ugly if/elseif to map