made alpha_to_number() less complex