#11 changing base algorithm